Skip to content

UX Guideline: add responsive table layout and agentic UX style#9239

Open
hyoshis wants to merge 1 commit into
mainfrom
hyoshi-uxguide
Open

UX Guideline: add responsive table layout and agentic UX style#9239
hyoshis wants to merge 1 commit into
mainfrom
hyoshi-uxguide

Conversation

@hyoshis

@hyoshis hyoshis commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Adds two sets of UX guidance to the azd style guides:

  1. Responsive list/table layouts for list commands, documented as part of the core azd design patterns in azd-style-guide.md.

  2. Agentic (AI / GitHub Copilot) UX patterns, moved into a dedicated agentic-ux-style-guide.md so the core guide focuses solely on core azd design patterns (which extensions may follow for consistency, but are not enforced).

Adds cross-references in the core guide's overview and in cli/azd/AGENTS.md so agents reference the correct file for the flow they're working on.

Adds two sets of UX guidance to the azd style guides:

1. Responsive list/table layouts for list commands, documented as part of the core azd design patterns in azd-style-guide.md.

2. Agentic (AI / GitHub Copilot) UX patterns, moved into a dedicated agentic-ux-style-guide.md so the core guide focuses solely on core azd design patterns (which extensions may follow for consistency, but are not enforced).

Adds cross-references in the core guide's overview and in cli/azd/AGENTS.md so agents reference the correct file for the flow they're working on.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 656aee2e-29aa-4b53-965c-63543c1dd44a
@hyoshis hyoshis self-assigned this Jul 21, 2026
Copilot AI review requested due to automatic review settings July 21, 2026 21:42
@github-actions

Copy link
Copy Markdown

🔗 Linked Issue Required

Thanks for the contribution! Please link a GitHub issue to this PR by adding Fixes #123 to the description or using the sidebar.
No issue yet? Feel free to create one!

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
22 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds authoritative guidance for responsive CLI tables and agentic UX.

Changes:

  • Documents responsive table layouts and conventions.
  • Adds a dedicated agentic UX style guide.
  • Directs agents to the appropriate UX guide.
Show a summary per file
File Description
cli/azd/docs/style-guidelines/azd-style-guide.md Adds responsive table guidance.
cli/azd/docs/style-guidelines/agentic-ux-style-guide.md Defines agentic visual patterns.
cli/azd/AGENTS.md Adds guide-selection instructions.

Review details

Comments suppressed due to low confidence (2)

cli/azd/docs/style-guidelines/azd-style-guide.md:403

  • [azd-code-reviewer] The full example has six data columns, while this compact example shows four and hides the remaining two. Since the formatter reports visible versus total defined columns, the hint should say “4 of 6,” not “4 of 5.”
Showing 4 of 5 columns. Resize the terminal or run with -o json for full details.

cli/azd/docs/style-guidelines/agentic-ux-style-guide.md:96

  • [azd-code-reviewer] This color summary says “hints” are gray, which conflicts with line 28’s statement that shared WithHintFormat hints are magenta. Name the gray element as the cancel affordance and explicitly preserve the shared hint color so the guide gives one unambiguous rule.
> Colors: `◆` and the subagent/tool names → magenta (`color.MagentaString`). `✔︎` → green. `✖` and error detail → red. Reasoning, sub-detail (`├`/`└`), and hints → gray. `◇ Using skill:` → cyan. Assistant prose → `WithMarkdown`.
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment on lines +359 to +364
{
Column: output.Column{Heading: "STATUS", ValueTemplate: "{{.Status}}"},
Priority: 1,
ColorFunc: extensionStatusColor, // semantic status color
},
}
| Subagent completed name | `✔︎ <subagent> completed` — name magenta (check green) | `SessionEventTypeSubagentCompleted` |
| Init "preparing" message | `Preparing application for Azure deployment...` magenta | `cmd/init.go` |

Reserve **direct `color.MagentaString`** styling for these agent-identity / active-AI-work cases. Do not magenta-color arbitrary text. (Shared `WithHintFormat` hints are a separate, allowed use of magenta.)

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small consistency nits in the new guides, both checked against the source.

────────────────────────────────────────────────────────────────────────────────────────
az-cli Azure CLI Up to date 1.0.0

Showing 4 of 5 columns. Resize the terminal or run with -o json for full details.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full-table example above shows six columns (ID, NAME, STATUS, INSTALLED, LATEST, SOURCE); compact drops LATEST and SOURCE, so this hint should read 4 of 6, not 4 of 5.

Suggested change
Showing 4 of 5 columns. Resize the terminal or run with -o json for full details.
Showing 4 of 6 columns. Resize the terminal or run with -o json for full details.

✔︎ GitHub Copilot completed
```

> Colors: `◆` and the subagent/tool names → magenta (`color.MagentaString`). `✔︎` → green. `✖` and error detail → red. Reasoning, sub-detail (`├`/`└`), and hints → gray. `◇ Using skill:` → cyan. Assistant prose → `WithMarkdown`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line lists hints as gray, but WithHintFormat maps to color.MagentaString in pkg/output/colors.go, and the section above calls the shared hint color magenta. The gray elements are the reasoning text, the / sub-detail lines, and the Press Ctrl+C to cancel affordance. Drop hints from the gray list (and name the cancel affordance instead) so the summary doesn't contradict the magenta-hint rule stated earlier in the file.

@richardpark-msft richardpark-msft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing huge, but just some areas that might need clarification, or are duplicating commentary we should probably put in code.


Commands that print a list of items — `azd tool list`, `azd tool check`, `azd extension list` (and its alias `azd ext list`), `azd extension source list`, `azd template list`, `azd template source list`, `azd copilot consent list` — render through the shared responsive formatter rather than hand-rolling their own `tabwriter` output. This keeps column names, colors, and layout behavior consistent, and gives every list command a layout that adapts to the terminal width.

**Any new or migrated list command MUST use this formatter.** A few legacy commands (e.g. `azd env list`, which still uses the plain `TableFormatter`) predate it — migrate them when touched rather than adding another bespoke table.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Any new or migrated list command MUST use this formatter.** A few legacy commands (e.g. `azd env list`, which still uses the plain `TableFormatter`) predate it — migrate them when touched rather than adding another bespoke table.
**Any new or migrated list command MUST use this formatter.**

I would just remove the bit about legacy commands. We should just file issues to move them over instead - this bit in the doc would just get stale over time, and the "new or migrated commands" bit covers your point well enough.

@@ -0,0 +1,104 @@
# Azure Developer CLI (`azd`) Agentic UX Style Guide

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty dense guide, but it makes sense.

When I'm reading it, I'm wondering if we're just missing some nice wrapper utils, or something that'll make sure we consistently apply the right policies when we're in the agentic flow. From what you've got below, it sounds like most of it is manual at the moment.

It's excellent to see it documented though, and hopefully (over time) we can chip away at this doc because it'll become enforced in the system.

```
...streamed reasoning text (dim gray)...

/ Thinking...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'm curious - what is your stance on using emojis for some of these? (🧠)

I've heard that it can be less than useful for some cases, like for people that are using screen readers, but I wondered the same about progress/spinners as well.

**Tool run and completion:**

```
Running powershell go build...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it should go in this doc, but there's a distinction between what the agent is saying it'll do, and the actual command that runs.

I'm assuming this text is always intended to be "what the agent says it will do". Are we supposed to (optionally) show the nitty gritty detail of the command that executed?


```
◆ GitHub Copilot
└ Generates Azure app scaffolding

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should have an identifier for sub-agents, specifically because I've noticed other GitHub apps acquiring other "sub" things, like nested sessions.

Each column is a `PrettyColumn` (a `Column` plus responsive metadata). Conventions:

- **Headings are UPPERCASE** and short (`ID`, `NAME`, `STATUS`, `INSTALLED`, `LATEST`, `SOURCE`, `CATEGORY`, `TYPE`, `LOCATION`). Reuse these standard names across commands — don't introduce a synonym like `VERSION` when `INSTALLED`/`LATEST` already express the concept.
- **`Priority`** controls compact visibility: `1` and `2` survive the compact breakpoint; `3+` are full-table only; `0` is treated as `1`. Keep the identifying columns (`ID`, `STATUS`, `INSTALLED`) at priority `1`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these field descriptions are just overlapping with the doc comments in the actual code we should just remove it. Agents can easily grab it from the code, and then we won't have stale docs.


#### List Command Guidelines

- **Always support `-o json`.** The responsive layouts are for humans; scripts and full detail should use `--output json`. The compact hint explicitly points users there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still kind of sad we don't have a "run with -o wide" or similar like kubectl, if only because it means they still have a way to see more text in a human readable way.

#### List Command Guidelines

- **Always support `-o json`.** The responsive layouts are for humans; scripts and full detail should use `--output json`. The compact hint explicitly points users there.
- **Empty state**: print a clear, single-line message instead of an empty table (e.g. `No tools found in the registry.`, `No tools found.`). Extension list adds guidance on how to add a source.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the empty message doesn't come from the table writer. Do we have a recommended function to print properly to the screen?

(I feel like @JeffreyCA just went through some headaches with this where we were not using a shared output writer, or something of that nature)


- **Always support `-o json`.** The responsive layouts are for humans; scripts and full detail should use `--output json`. The compact hint explicitly points users there.
- **Empty state**: print a clear, single-line message instead of an empty table (e.g. `No tools found in the registry.`, `No tools found.`). Extension list adds guidance on how to add a source.
- **Stable ordering**: the formatter does not sort — it renders (and groups cards) in the order rows are passed in. **Sort your rows before formatting** and group by a stable key (`tool list` by `CATEGORY`, `extension list` by `SOURCE`) so output is deterministic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are 'cards' in this discussion?

- **Always support `-o json`.** The responsive layouts are for humans; scripts and full detail should use `--output json`. The compact hint explicitly points users there.
- **Empty state**: print a clear, single-line message instead of an empty table (e.g. `No tools found in the registry.`, `No tools found.`). Extension list adds guidance on how to add a source.
- **Stable ordering**: the formatter does not sort — it renders (and groups cards) in the order rows are passed in. **Sort your rows before formatting** and group by a stable key (`tool list` by `CATEGORY`, `extension list` by `SOURCE`) so output is deterministic.
- **Don't hand-roll a new table.** If you find yourself writing `tabwriter` for a list of items, use `PrettyTableFormatter` instead so the command inherits responsive behavior for free.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can delete this line. You've made the case. :)

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified all the code references in both guides against main - the constants, file paths, and color helpers all check out. Two small doc-accuracy nits from my earlier pass are still open (the compact-table column count and the hints color label), but neither blocks. Nice addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UX] Guideline: Document responsive table patterns in UX guideline [UX] Guideline: Add agentic UX pattern to style MD file

5 participants